﻿
#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using MarketPulse.BusinessLogic.Common;

#endregion

namespace MarketPulse.BusinessLogic.Private.StateMachine
{
    [Serializable]
    internal class AssignmentStateCompleted : AssignmentStateBase
    {
        internal AssignmentStateCompleted(bool throwIfInvalid)
            : base(throwIfInvalid)
        {
            mAssignmentStateType = AssignmentStatusTypeList.Completed;
            InitAssignmentStateString();
        }

        public override bool Revisit(IAssignmentStateContext context, bool tryTransition)
        {
            if (!tryTransition)
            {
                context.SetState(new AssignmentStateReleased(mThrowIfInvalid));
            }
            return true;
        }
        

    }
}
